import { RouteRecordRaw } from "vue-router";
const Layout = () => import("@/layouts/index.vue");

const OrgAsyncRoutes: RouteRecordRaw[] = [
  {
    path: "/org",
    name: "org",
    meta: {
      title: "系统管理"
    },
    component: Layout,
    redirect: "/org/user-service",
    children: [
      {
        path: "user-service",
        name: "UserService",
        meta: {
          menuName: "组织与用户",
          menuCode: "vms:org:auth:user"
        },
        redirect: "/org/user-service/index",
        children: [
          {
            path: "index",
            name: "UserServiceIndex",
            meta: {
              icon: "icon-user",
              title: "组织与用户",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/user/index.vue")
          },
          {
            path: "add",
            name: "UserServiceAdd",
            meta: {
              icon: "icon-user",
              title: "新增组织与用户",
              activeMenu: "/org/user-service/index",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/user/form.vue")
          },
          {
            path: "form/:id",
            name: "UserServiceEdit",
            meta: {
              icon: "icon-user",
              title: "编辑组织与用户",
              activeMenu: "/org/user-service/index",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/user/form.vue")
          }
        ]
      },
      {
        path: "role-service",
        name: "RoleService",
        meta: {
          menuName: "角色与权限",
          menuCode: "vms:org:auth:role"
        },
        redirect: "/org/role-service/index",
        children: [
          {
            path: "index",
            name: "RoleServiceIndex",
            meta: {
              icon: "icon-user",
              title: "角色与权限",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/role/index.vue")
          },
          {
            path: "add",
            name: "RoleServiceAdd",
            meta: {
              icon: "icon-user",
              title: "新增角色与权限",
              activeMenu: "/org/role-service/index",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/role/form.vue")
          },
          {
            path: "form/:id",
            name: "RoleServiceEdit",
            meta: {
              icon: "icon-user",
              title: "编辑角色与权限",
              activeMenu: "/org/role-service/index",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/role/form.vue")
          }
        ]
      },
      {
        path: "app-menu-service",
        name: "AppMenuService",
        meta: {
          menuName: "菜单管理",
          menuCode: "vms:org:system:app-menu"
        },
        redirect: "/org/app-menu-service/index",
        children: [
          {
            path: "/org/app-menu-service/index",
            name: "AppMenuServiceIndex",
            meta: {
              icon: "icon-PC-menu",
              title: "菜单管理",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/app-menu/index.vue")
          }
          // {
          //     path: 'add',
          //     name: 'AppMenuServiceAdd',
          //     component: () => import('/@/views/org/dictionary-type/form.vue'),
          // },
          // {
          //     path: 'form/:id',
          //     name: 'AppMenuServiceForm',
          //     component: () => import('/@/views/org/dictionary-type/form.vue'),
          // }
        ]
      },
      {
        path: "bomf-cache-service",
        name: "BomfCacheService",
        meta: {
          menuName: "数据刷新",
          menuCode: "vms:org:system:bomf-cache"
        },
        redirect: "/org/bomf-cache-service/index",
        children: [
          {
            path: "/org/bomf-cache-service/index",
            name: "BomfCacheServiceIndex",
            meta: {
              icon: "#icon-refresh",
              title: "数据刷新",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/bomf-cache/index.vue")
          }
        ]
      },
      {
        path: "attachment-service",
        name: "AttachmentService",
        meta: {
          menuName: "附件管理",
          menuCode: ""
        },
        redirect: "/org/attachment-service/index",
        children: [
          {
            path: "/org/attachment-service/index",
            name: "AttachmentServiceIndex",
            meta: {
              icon: null,
              title: "附件管理",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/attachment/index.vue")
          }
        ]
      },
      {
        path: "job-scheduler-service",
        name: "JobSchedulerService",
        meta: {
          menuName: "定时任务管理",
          menuCode: "vms:org:system:job-scheduler"
        },
        redirect: "/org/job-scheduler-service/index",
        children: [
          {
            path: "/org/job-scheduler-service/index",
            name: "JobSchedulerServiceIndex",
            meta: {
              icon: null,
              title: "定时任务管理",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/job-scheduler/index.vue")
          },
          {
            path: "/org/job-scheduler-service/add",
            name: "JobSchedulerServiceAdd",
            meta: {
              icon: null,
              title: "新增定时任务管理",
              activeMenu: "/org/job-scheduler-service/index",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/job-scheduler/form.vue")
          },
          {
            path: "/org/job-scheduler-service/form/:id",
            name: "JobSchedulerServiceEdit",
            meta: {
              icon: null,
              title: "编辑定时任务管理",
              activeMenu: "/org/job-scheduler-service/index",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/job-scheduler/form.vue")
          }
        ]
      },
      {
        path: "jxudp-data-source-service",
        name: "JxudpDataSourceService",
        meta: {
          menuName: "多数据源管理",
          menuCode: "vms:org:system:jxudp-data-source"
        },
        redirect: "/org/jxudp-data-source-service/index",
        children: [
          {
            path: "index",
            name: "JxudpDataSourceServiceIndex",
            meta: {
              icon: null,
              title: "多数据源管理",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/jxudp-data-source/index.vue")
          },
          {
            path: "add",
            name: "JxudpDataSourceServiceAdd",
            meta: {
              icon: null,
              title: "新增多数据源管理",
              activeMenu: "/org/jxudp-data-source-service/index",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/jxudp-data-source/form.vue")
          },
          {
            path: "form/:id",
            name: "JxudpDataSourceServiceEdit",
            meta: {
              icon: null,
              title: "编辑多数据源管理",
              activeMenu: "/org/jxudp-data-source-service/index",
              isLink: "",
              isHide: false,
              isFull: false,
              isAffix: false,
              isKeepAlive: true
            },
            component: () => import("@/views/org/jxudp-data-source/form.vue")
          }
        ]
      }
    ]
  }
];

export default OrgAsyncRoutes;
